$('.Submit').on('tap',function(){
	var email=$('#email').val();
	var valite=$('#valite').val();

	if(email == "" || valite == ""){
		dialog('Forgot Password','Your email or captcha must enter' , 1);
		var $dialog = $('#dialog');
		$dialog.show();
		$('.weui_dialog_ft').addClass('setWidth');
		$dialog.find('#comfirmBtn').one('click', function() {
			$dialog.hide();
			$dialog.remove();
		});
		return false;
	}

	var arr={
		hf_s_id:"WD11",
		hf_srv_id:"Cv_jforget_pwd",
		hs_action_id:"save",
		hs_email:email,
		hs_mobile_ind:"Y",
		hs_captcha:valite
	};
	getAjaxRequest(arr,function(result){

		if(result.bs_result==BS_RESULT.OK){
			dialog('Forgot Password', 'Success, please check your email for login instructions.', 1);
		  	var $dialog = $('#dialog');
		  	$dialog.show();
		  	$('.weui_dialog_ft').addClass('setWidth');
		   	$dialog.find('#comfirmBtn').one('click', function() {
				$dialog.hide();
				$dialog.remove();
				location.href=MPJ.base+"/index.jsp";
			});
		}else{
			dialog('Forgot Password', result.bs_message , 1);
			var $dialog = $('#dialog');
			$dialog.show();
			$('#comfirmBtn').html('OK');
			$('.weui_dialog_ft').addClass('setWidth');
			$dialog.find('#comfirmBtn').one('click', function() {
				$dialog.hide();
				$dialog.remove();
				var date=new Date();
				$('.vilidate').html('<img src="http://203.189.170.43/mpj2/Captcha.jpg?'+date.getTime()+'" />');
			});
			
		}
		
	},null,true);
        
})


$('.Reload').on('tap',function(){
	var date=new Date();
	$('.vilidate').html('<img src="http://203.189.170.43/mpj2/Captcha.jpg?'+date.getTime()+'" />');
})
